﻿@model Model.AppUserList
@{
    ViewBag.Title = "QualityInfo";
    Layout = "~/Views/Shared/_JQBaseLayOut.cshtml";
}
@using Model
@section JQscriptSection{
    <script type="text/javascript">

        $(document).ready(function () {
            InitGrid();
        });
        //初始化数据
        function InitGrid() {
            var OrderNo = $('#txtOrderNo').val();
            var GoodsCode = $('#txtGoodsCode').val();
            var GoodsName = $('#txtGoodsName').val();
            var Qualitytype = $("#selQualitytype  option:selected").val();
            var Flag = $("#selFlag  option:selected").val();
            var Result = $("#selResult option:selected").val();
            queryParams = {
                OrderNo: OrderNo,
                GoodsCode: GoodsCode,
                GoodsName: GoodsName,
                Qualitytype: Qualitytype,
                Flag: Flag,
                Result: Result
            }
            HandleData.InitDataGrid('dg', '/QualityInfo/InitJsonResult', 'toolbar', queryParams, 'ORDERNO', false, function (data) { },
                function (rowIndex, rowData) {//双击
                    edit(rowData);
                });
        }
    </script>
}

<body style="background-color: ButtonFace; font-size: 17px">
    <div class="easyui-panel" title="查询条件" style="height: 130px; padding: 5px; background: #fafafa; width: 1700px;">
        <form id="query" method="post">
            <table>
                <tr>
                    <td>订单号:
                    </td>
                    <td>
                        <input id="txtOrderNo" name="txtOrderNo" style="width: 154px" />
                    
                    </td>
                    <td>商品编码:
                    </td>
                    <td>
                        <input id="txtGoodsCode" name="txtGoodsCode" style="width: 154px" />
                    
                    </td>
                    <td>商品名称:
                    </td>
                    <td>
                        <input id="txtGoodsName" name="txtGoodsName" style="width: 154px" />
                    
                    </td>
                    @*<td>质检类型:
                    </td>
                    <td>
                        <input id="DeliverArea" class="easyui-combobox" name="DeliverArea" style="width: 155px;" data-options="required:true,valueField:'fieldvalue',textField:'lookup',url:'@Url.Action("LookupList", "PrintOrderInfo", new {LookupID="LOCATIONAREA", IsSetAll = "0" })',editable:false">
                    
                    </td>*@
                    <td>质检类型:
                    </td>
                    <td>
                        <select id="selQualitytype">
                            <option value="0">全部</option>
                            <option value="1">全检</option>
                            <option value="2">临检</option>
                            <option value="3">暂存</option>

                        </select>
                    </td>
                    <td>质检状态:
                    </td>
                    <td>
                        <select id="selFlag">
                            <option value="0">全部</option>
                            <option value="1">待处理</option>
                            <option value="2">已提交</option>
                            <option value="3">已退回</option>
                        </select>
                    </td>
                    <td>质检结果:
                    </td>
                    <td>
                        <select id="selResult">
                            <option value="0">全部</option>
                            <option value="1">合格</option>
                            <option value="2">不合格</option>
                        </select>
                    </td>

                    <td></td>
                    <td>
                        <a id="btnSerach" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="InitGrid();">查询</a>

                    </td>
                </tr>
            </table>
        </form>
    </div>
    <div style="min-height: 720px; width: 1700px;">
        <table id="dg" title="质检商品明细" style="min-height: 600px;">
            <thead>
                <tr>
                    @*<th data-options="field:'APPORDERNO',width:50">批次号</th>*@
                    <th data-options="field:'ORDERNO',width:100">订单号</th>
                    <th data-options="field:'GOODSCODE',width:60">商品编码</th>
                    <th data-options="field:'GOODSNAME',width:60">商品名称</th>
                    <th data-options="field:'QUALITYTYPE',width:60">质检类型</th>
                    <th data-options="field:'INSPECTRESULT',width:50">质检结果</th>
                    <th data-options="field:'RECEIPTQTY',width:50">质检数量</th>
                    <th data-options="field:'QUALITIEDQTY',width:50">合格数量</th>
                    <th data-options="field:'UNQUALITIEDQTY',width:50">不合格数量</th>
                    <th data-options="field:'INSPECTOR',width:50">质检人员</th>
                    <th data-options="field:'INSPECTDATE',width:80,sortable:true,formatter:function(value, rowData, rowIndex){ return FormatData.formatDate(value);}">质检时间</th>
                </tr>
            </thead>
        </table>
    </div>
    @Html.Partial("~/Views/Shared/_PartialToolbar.cshtml", new Toolbar
{
    GridName = "dg",
    GridType = "datagrid",
    ToolbarName = "toolbar",
    FunctionModule = new Dictionary<string, List<FunctionModule>>()
    {
        {"Function",new List<FunctionModule>()
            {
              new FunctionModule(){Name = "Add",IsEnable =false },
              new FunctionModule(){Name = "Edit",IsEnable =false },
              new FunctionModule(){Name = "Remove",IsEnable =false },
              new FunctionModule(){Name = "Reload",IsEnable =false },
              new FunctionModule(){Name = "Collapse",IsEnable =false },
              new FunctionModule(){Name = "Exporter",IsEnable =false },
              new FunctionModule(){Name = "AllEdit",IsEnable =false },
              new FunctionModule(){Name = "Preview",IsEnable =false },
              new FunctionModule(){Name = "Printer",IsEnable =false },

            }
        }
    }
})

</body>
